<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{margin:0;padding:0;}
	#myDiv{width:100px;height:100px;border:1px solid #ddd;}
</style>
</head>

<body>
	<div id="myDiv"></div>
    <div id="myDiv"></div>
    <div id="myDiv"></div>
    <script>
    	//var div1=document.getElementById('myDiv');
		//div1.style.width='200px';
		
		//var div2=document.getElementById('myDiv');//只是获取第一个div
		//div2.style.width='300px';
		var div3=document.getElementById('mydiv');
		div3.style.width='600px';
    </script>
</body>
</html>
